package com.sg.controller.rbff;

import com.sg.service.biz.rbff.ResourceFileService;
import com.sg.dto.biz.rbff.req.*;
import com.sg.dto.biz.rbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "ResourceFile", tags = {"ResourceFile"})
@RestController
// @RequestMapping("/rbff/resourceFile/")
public class ResourceFileController {

    @Autowired
    ResourceFileService resourceFileService;

    /**
     * B8修改专辑下文件存档
     * gen by moon at 11/14/2024, 1:20:20 PM
     */
    @PostMapping("/oms/dataassets/resourceFile/updateAlbumFileArchive")
    @ApiOperation(value = "B8修改专辑下文件存档", response = OkrResult.class)
    public OkrResult<BffUpdateAlbumFileArchiveRespDto> updateAlbumFileArchive(@RequestBody(required = false) @Validated BffUpdateAlbumFileArchiveReqDto reqDTO) {
        return OkrResult.success(resourceFileService.updateAlbumFileArchive(reqDTO));
    }

    /**
     * B8新增资源文件
     * gen by moon at 11/28/2024, 12:07:11 AM
     */
    @PostMapping("/oms/dataassets/resourceFile/addResourceFile")
    @ApiOperation(value = "B8新增资源文件", response = OkrResult.class)
    public OkrResult<BffAddResourceFileRespDto> addResourceFile(@RequestBody(required = false) @Validated BffAddResourceFileReqDto reqDTO) {
        return OkrResult.success(resourceFileService.addResourceFile(reqDTO));
    }

    /**
     * B8新增资源文件上区块链
     * gen by moon at 12/8/2024, 3:58:00 AM
     */
    @PostMapping("/oms/dataassets/resourceFile/addEviFilesChain")
    @ApiOperation(value = "B8新增资源文件上区块链", response = OkrResult.class)
    public OkrResult<BffAddEviFilesChainRespDto> addEviFilesChain(@RequestBody(required = false) @Validated BffAddEviFilesChainReqDto reqDTO) {
        return OkrResult.success(resourceFileService.addEviFilesChain(reqDTO));
    }

    /**
     * B8查询存证记录信息
     * gen by moon at 12/10/2024, 12:35:51 AM
     */
    @PostMapping("/oms/dataassets/resourceFile/queryEviRecordDetail")
    @ApiOperation(value = "B8查询存证记录信息", response = OkrResult.class)
    public OkrResult<BffQueryEviRecordDetailRespDto> queryEviRecordDetail(@RequestBody(required = false) @Validated BffQueryEviRecordDetailReqDto reqDTO) {
        return OkrResult.success(resourceFileService.queryEviRecordDetail(reqDTO));
    }

    /**
     * B8生成文件简介
     * gen by moon at 12/10/2024, 12:35:59 AM
     */
    @PostMapping("/oms/dataassets/resourceFile/questionResourceFileDetail")
    @ApiOperation(value = "B8生成文件简介", response = OkrResult.class)
    public OkrResult<BffQuestionResourceFileDetailRespDto> questionResourceFileDetail(@RequestBody(required = false) @Validated BffQuestionResourceFileDetailReqDto reqDTO) {
        return OkrResult.success(resourceFileService.questionResourceFileDetail(reqDTO));
    }

    /**
     * B8查询资源文件列表
     * gen by moon at 5/23/2025, 6:12:46 PM
     */
    @PostMapping("/oms/dataassets/resourceFile/queryResourceFileList")
    @ApiOperation(value = "B8查询资源文件列表", response = OkrResult.class)
    public OkrResult<BffQueryResourceFileListRespDto> queryResourceFileList(@RequestBody(required = false) @Validated BffQueryResourceFileListReqDto reqDTO) {
        return OkrResult.success(resourceFileService.queryResourceFileList(reqDTO));
    }
}
